package com.fs;

public class copy {

    public static void main(String[] args) {
        int[] arr1={01,02,03};
        int[] arr2=copy(arr1);

        printf(arr2);
    }

    public static int[] copy(int[] arr1)
    {

        int[] arr2=new int[arr1.length];
        for (int i = 0; i < arr1.length; i++) {
            arr2[i]=arr1[i];

        }
        return arr2;
    }
    public static void printf(int[] arr2)
    {
        System.out.print("[");
        for (int i = 0; i < arr2.length; i++) {
            if(i==arr2.length-1)
            System.out.print(arr2[i]);
            else
            System.out.print(arr2[i]+",");
        }
        System.out.print("]");
    }
}
